home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume3 / hyphen < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  4.1 KB

  1. From: Stewart Levin <genrad!decvax!mazama!stew>
  2. Subject: troff hyphenation utility
  3. Newsgroups: mod.sources
  4. Approved: jpn@panda.UUCP
  5.  
  6. Mod.sources:  Volume 3, Issue 67
  7. Submitted by: Stewart Levin <genrad!decvax!mazama!stew>
  8.  
  9.  
  10. #! /bin/sh
  11. # This is a shell archive, meaning:
  12. # 1. Remove everything above the #! /bin/sh line.
  13. # 2. Save the resulting text in a file.
  14. # 3. Execute the file with /bin/sh (not csh) to create the files:
  15. #    Makefile
  16. #    hyphen.1
  17. #    hyphen.lib
  18. #    hyphen.sh
  19. # This archive created: Tue Dec 24 09:13:47 1985
  20. export PATH; PATH=/bin:$PATH
  21. echo shar: extracting "'Makefile'" '(211 characters)'
  22. if test -f 'Makefile'
  23. then
  24.     echo shar: will not over-write existing file "'Makefile'"
  25. else
  26. cat << \SHAR_EOF > 'Makefile'
  27. BIN=/usr/bin/
  28. LIB=/usr/lib/
  29. MAN=/usr/man/man1
  30. install: 
  31.     sed -e 's@$$(LIB)@$(LIB)@' <hyphen.sh >hyphen
  32.     install -m 555 hyphen $(BIN)
  33.     install -c -m 555 hyphen.lib $(LIB)hyphen
  34.     install -c -m 444 hyphen.1 $(MAN)
  35. SHAR_EOF
  36. if test 211 -ne "`wc -c < 'Makefile'`"
  37. then
  38.     echo shar: error transmitting "'Makefile'" '(should have been 211 characters)'
  39. fi
  40. fi
  41. echo shar: extracting "'hyphen.1'" '(732 characters)'
  42. if test -f 'hyphen.1'
  43. then
  44.     echo shar: will not over-write existing file "'hyphen.1'"
  45. else
  46. cat << \SHAR_EOF > 'hyphen.1'
  47. .TH HYPHEN 1
  48. .SH NAME
  49. hyphen \- filter troff input, inserting conditional hyphenation
  50. .SH SYNOPSIS
  51. .B hyphen
  52. [file1 file2 ...]
  53. .SH DESCRIPTION
  54. Some words are exceptions to troff's built in hyphenation rules.
  55. While troff has a limited facility to handle such exceptions (the .hw
  56. command), the facility is easily overloaded.
  57. .I Hyphen
  58. is an alternative that inserts explicit conditional hyphenation
  59. (\e%) into a system dependent list of exceptions.
  60. .sp
  61. This command copies the named files to standard output, inserting
  62. conditional hyphenation.  If no files are specified, standard input
  63. is read.
  64. .SH FILES
  65. /usr/lib/hyphen        editor list of words to hyphenate
  66. .SH "SEE ALSO"
  67. sed(1), vtroff(1), eqn(1), tbl(1)
  68. .SH AUTHOR
  69. Stewart A. Levin
  70. SHAR_EOF
  71. if test 732 -ne "`wc -c < 'hyphen.1'`"
  72. then
  73.     echo shar: error transmitting "'hyphen.1'" '(should have been 732 characters)'
  74. fi
  75. fi
  76. echo shar: extracting "'hyphen.lib'" '(768 characters)'
  77. if test -f 'hyphen.lib'
  78. then
  79.     echo shar: will not over-write existing file "'hyphen.lib'"
  80. else
  81. cat << \SHAR_EOF > 'hyphen.lib'
  82. s/unknown/un\\%known/g
  83. s/devised/de\\%vised/g
  84. s/comparisons/com\\%par\\%i\\%sons/g
  85. s/geophysical/ge\\%o\\%phys\\%i\\%cal/g
  86. s/boundary/bound\\%a\\%ry/g
  87. s/trigonometric/trig\\%o\\%no\\%met\\%ric/g
  88. s/velocity/ve\\%loc\\%i\\%ty/g
  89. s/kilometer/kil\\%o\\%me\\%ter/g
  90. s/prestack/pre\\%stack/g
  91. s/unfamiliarity/un\\%fa\\%mil\\%iar\\%i\\%ty/g
  92. s/acknowledge/ac\\%knowl\\%edge/g
  93. s/crystals/crys\\%tals/g
  94. s/extrapolation/ex\\%trap\\%o\\%la\\%tion/g
  95. s/familiar/fa\\%mil\\%iar/g
  96. s/propagating/prop\\%a\\%ga\\%ting/g
  97. s/participate/par\\%tic\\%i\\%pate/g
  98. s/destroy/de\\%stroy/g
  99. s/parameter/pa\\%ram\\%e\\%ter/g
  100. s/semicircular/sem\\%i\\%cir\\%cu\\%lar/g
  101. s/semicircle/sem\\%i\\%cir\\%cle/g
  102. s/graduate/grad\\%u\\%ate/g
  103. s/wraparound/wrap\\%around/g
  104. s/semidefinite/sem\\%i\\%def\\%i\\%nite/g
  105. SHAR_EOF
  106. if test 768 -ne "`wc -c < 'hyphen.lib'`"
  107. then
  108.     echo shar: error transmitting "'hyphen.lib'" '(should have been 768 characters)'
  109. fi
  110. fi
  111. echo shar: extracting "'hyphen.sh'" '(639 characters)'
  112. if test -f 'hyphen.sh'
  113. then
  114.     echo shar: will not over-write existing file "'hyphen.sh'"
  115. else
  116. cat << \SHAR_EOF > 'hyphen.sh'
  117. #! /bin/sh
  118. : shell  hyphen
  119. if { [ \( -t 0 \)  -a  \( 0 = $# \) ] ; } then \
  120. { cat <<DATA ; }
  121. /*
  122. filter troff input, inserting conditional hyphenation
  123.   
  124. hyphen  [ file1 file2 ... ]
  125.   
  126. parameters:
  127.     file        troff file(s) to conditionally hyphenate. Default is
  128.             standard input.
  129. discussion:
  130. Some words are exceptions to troff's built in hyphenation rules.
  131. While troff has a limited facility to handle such exceptions (the
  132. .hw command), the facility is easily overloaded.  This program
  133. is an alternative that inserts explicit conditional hyphenation
  134. (\%) into a system dependent list of exceptions.
  135. */
  136. DATA
  137. else { sed -f $(LIB)hyphen $* ; }
  138. fi
  139. SHAR_EOF
  140. if test 639 -ne "`wc -c < 'hyphen.sh'`"
  141. then
  142.     echo shar: error transmitting "'hyphen.sh'" '(should have been 639 characters)'
  143. fi
  144. fi
  145. exit 0
  146. #    End of shell archive
  147.